<?php

// header ("Content-Type:text/plain"); 
header ("Content-Type:text/xml");

include('core/init.inc.php');

// get_playlists("MarkeMarkVideo");
// $videos_playlist = get_playlists('SoRetro1972');
// print_r( get_videos('MarkeMarkVideo') );
// print_r( get_videos('SoRetro1972') );
// print_r( get_playlists("MarkeMarkVideo") );

?>



<videos>
	<?php
		$username = $_GET["u"];
		$playlist = $_GET["p"];

		echo( $username );
		echo( $playlist );
	
		// $videos = get_videos_in_playlist('MarkeMarkVideo', '48D1F0A920A3D21C');
		$videos = get_videos_in_playlist($username, $playlist);
	
		foreach ( $videos as $video ) {
				echo "<video>";
					echo "<title>{$video['title']}</title>";
					echo "<desc>{$video['desc']}</desc>";
					echo "<url>{$video['url']}</url>";
					echo "<img1>{$video['imgs'][0]}</img1>";
					echo "<img2>{$video['imgs'][1]}</img2>";
					echo "<img3>{$video['imgs'][2]}</img3>";
				echo "</video>";
		}
	?>
	
	
	<?php
		// $videos = get_videos('SoRetro1972', 'FlashWork');
		// 	
		// 	foreach ( $videos as $video ) {
		// 		echo "<video>";
		// 			echo "<title>{$video['title']}</title>";
		// 			echo "<desc>{$video['desc']}</desc>";
		// 			echo "<url>{$video['url']}</url>";
		// 			echo "<keyword>{$video['keyword']}</keyword>";
		// 		echo "</video>";
		// 	}
	?>
</videos>